
<?php

if(empty($_SESSION['username_admin'])and empty($_SESSION['password_admin']) and empty($_SESSION['level_admin'])){
header("Location:../index.php");

}else{
		$username_admin=$_SESSION['username_admin'];
		$password_admin=$_SESSION['password_admin'];
		$lavel_admin=$_SESSION['level_admin'];
		$id_session=session_id();
		echo"<table><tr><td colspan='2'>&nbsp&nbsp;</td></tr>";
	echo"<tr><td colspan='2' class='judul'>&#187 Update Data Pegawai </td></tr>";
	echo"<tr><td colspan='2' style='paddding-left=5px; padding-right=5px;'></td> <hr color='#6d6a69'></hr></tr>";
	echo"<tr><td colspan='2'>&nbsp; </td></tr>";
		echo "<tr><td valign='top' colspan='2'></td></tr></table>";	
		$query=dbQuery("select * from tbpegawai where id_pegawai='$_GET[id_pegawai]'");
		$data=dbAssoc($query);
?>
<form name="edit_pegawai" id="edit_pegawai" action="index_admin.php?index=update_pegawai&cryption=<?php print $encode."*upn*".$santra.$random; ?>" method="post" enctype="multipart/form-data">
<table width="98%" border="0" cellspacing="0" cellpadding="5" class="tabel">
   <tr>
    <td width="250" class="form_insert">Id Pegawai </td>
    <td width="395" class="jarak_form" ><input type="text" name="id_pegawai"  id="id_pegawai" size="50" class="form" value="<?php print $data['id_pegawai']; ?>" readonly="readonly" /></td>
  </tr>
  <tr>
    <td width="250" class="form_insert">Nama Pegawai </td>
    <td width="395" class="jarak_form" ><input type="text" name="nama"  id="nama" size="50" class="form" value="<?php print $data['nama_pegawai']; ?>" /></td>
  </tr>
  <tr>
   <td width="250" class="form_insert">Username</td>
    <td class="jarak_form" >
	<input type="text" name="username"  id="username" size="50" class="form" value="<?php print $data['username']; ?>" />
	</td>
  </tr>
   
  <tr>
    <td class="form_insert" >Password Baru</td>
    <td class="jarak_form"  >	<input type="password" name="password"  id="password" size="50" class="form" value="<?php  $data['password']; ?>" /></td>
  </tr>
  <tr>
    <td class="form_insert" >Level</td>
    <td class="jarak_form"  >	<input type="text" name="level"  id="level" size="50" class="form" value="pegawai" readonly="readonly" /></td>
  </tr>
  
  
  <tr>
    <td class="isi_depan">&nbsp;</td>
    <td ><input type="submit" name="button_menu" value="Update Pegawai" class="button" onclick="return valid_edit_pegawai();"></td>
  </tr>
  <?php
  
  echo"<tr><td colspan='2'>&nbsp;</tr>";
echo"<tr><td colspan='2'>&nbsp;</tr>";
echo"<tr><td colspan='2'>&nbsp;</tr>";
  ?>
</table>
</form>
<?php }

?>